﻿@model CoralNode.MvcClient.Models.LoginModel
@using CoralNode.MvcClient.Contexts
@using CoralNode.MvcClient.Helper;
@{
    Layout = null;
}
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>@CoralNodeContext.Current.ManageSite.Slogan-@CoralNodeContext.Current.ManageSite.Name
    </title>
    <link rel="stylesheet" type="text/css" href="/Themes/CoralAdmin/_misc/css/screen.css">
    <link rel="stylesheet" type="text/css" href="/Themes/CoralAdmin/_misc/css/login.css">
    <script src="/Themes/CoralAdmin/_misc/scripts/jquery-1.7.2.min.js"></script>
</head>
<body>
    <div id="wrap">
        <div id="phead">
            <div class="extra">
                <span class="logo"><a href="#" style="background-image:url(@Html.ImageUrl(CoralNodeContext.Current.ManageSite.Logo))">@CoralNodeContext.Current.ManageSite.Name</a></span>
                <!--<div class="r">
                    <a href="#">网站首页</a><a href="#">帮助文档</a>
                </div>-->
            </div>
        </div>
        <div id="pbody">
            <div class="extra">
                <div class="box_login form_main">
                    <span class="t">用户登录</span>
                    <form method="post" action="/m/passport/login" id="loginform">
                        @Html.AntiForgeryToken()
                        @Html.ValidationSummary(true)
                        <div class="pl_4 pr_4 pt_4 pb_2-5">
                            <table>
                                <tr>
                                    <td>
                                        <label class="t_msg">用户名</label>
                                        @Html.TextBoxFor(m => m.UserName, new { @class = "text w_26", @msg = "用户名" })
                                        @Html.ValidationMessageFor(m => m.UserName)

                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <label class="t_msg">密码</label>
                                        @Html.PasswordFor(m => m.Password, new { @class = "text w_26", @msg = "密码" })
                                        @* <input type="hidden" name="SiteId" value="@ViewBag.Site.Id"/>*@
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <label style="float: none" class="t_msg">验证码</label>
                                        <label>
                                            @Html.TextBoxFor(m => m.VerifyCode, new { @class = "text w_11", @msg = "验证码" })<img
                                                id="verify" src="/m/passport/GetVerifyCode"
                                                data-href="/m/passport/GetVerifyCode"
                                                alt="" /><a id="change_verify" href="javascript:void(0);">换一张</a></label>
                                    </td>
                                </tr>
                                @*<tr>
                                    <td style="height: auto">
                                        <label class="mr_4">
                                            <input class="checkbox" type="checkbox" name="AutoLogin" value="@true.ToString()" />自动登录</label>
                                    </td>
                                </tr>*@
                                <tr>
                                    <td>
                                        <label class="submit mt_2">
                                            <input class="w_8" type="submit" value="登  录" /></label>
                                    </td>
                                </tr>
                            </table>
                            @if (Model != null && !string.IsNullOrEmpty(Model.Msg)) {
                                <div class="msg">
                                    <label>@Html.DisplayFor(m => m.Msg)</label>
                                </div>
                            }
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <!--<div id="pfoot"><div class="line_white"></div>
	<div class="extra">
		<div class="nav_foot"><a href="#">官方网站</a>|<a href="#">使用协议</a></div>
        <div class="copyright">Powered By SPCMS RC1.0 &copy; 2013 Simplepig  Inc.</div>
</div></div>-->
    <script src="/Themes/CoralAdmin/_misc/scripts/jquery.plugin.js"></script>
    <script src="/Themes/CoralAdmin/_misc/scripts/login.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $('form').submit(function () {
                if ($('input[name="UserName"]').val() == "dookaysuper") {
                    return false;
                } else {
                    return true;
                };
                var $login = $('input[name="autoLogin"]');
                if ($login.attr("checked") != undefined) {
                    $login.val(true);
                } else {
                    $login.val(false);
                }
            });
        })
    </script>
</body>
</html>
